<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:mc="http://java.sun.com/jsf/composite/components"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">


<h:head>
<link rel="stylesheet" type="text/css" href="#{resource['css:style.css']}" />
	<title>Primefaces with facelet</title>
</h:head>

<h:body>
	<ui:composition template="/templates/common.xhtml">
		<ui:define name="title">anasayfa</ui:define>
		
		<ui:define name="header.homepage"><li><h:link outcome="homepage.xhtml" class="but1_active" value="Anasayfa"/></li></ui:define>
		
		<ui:define name="sidebar">
		<div id="sidebar">
				<h:graphicImage library="images" name="title1.gif" width="174" height="30" /><br />																																																																		<div class="inner_copy"><a href="http://www.bestfreetemplates.org/">free templates</a><a href="http://www.bannermoz.com/">banner templates</a></div>
				<ul id="list">
					<li class="color"><a href="#">mustafa</a></li>
					<li><a href="#">muahmemt</a></li>
				</ul>
			</div>
		</ui:define>
		
		<ui:define name="main">
		<div id="main_block">
		<h:form>
		

		
		<p:dataGrid var="poll" value="#{homePageBean.pollBo.getAllPolls()}" columns="3"
		rows="6" paginator="false" effect="true"
		>
		<p:column>
			<p:panel header="Anket ID: #{poll.pollId}" style="text-align:center">
						<h:panelGrid columns="1">
						<p:dataTable value="#{poll.getAllOptionsWithLimit(3)}" var="o" rowIndexVar="rowIndex">
						<p:column>#{rowIndex+1}</p:column>
						<p:column><f:facet name="header">Seçenekler</f:facet>#{o.content}</p:column>
						</p:dataTable>
				</h:panelGrid>
			</p:panel>
		</p:column>
		</p:dataGrid>
		</h:form>
		</div>
	
		</ui:define>
	
	</ui:composition>
</h:body>

</html>